package com.ygp.dtp.common.constant;

/**
 * @description: 动态数据源常量
 * @motto: 代码源于生活，高于生活艺术
 * @author: zhouhengzhe
 * @date: 2022/8/4 16:15
 * @since 1.0
 **/
public class DynamicTpConstant {

    public static final String MAIN_PROPERTIES_PREFIX = "spring.dynamic.tp";

    public static final String DTP_ENABLED_PROP = MAIN_PROPERTIES_PREFIX + ".enabled";

    public static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();

    public static final String PROPERTIES_CHANGE_SHOW_STYLE = "%s => %s";

    /**
     * 应用名
     */
    public static final String SPRING_APPLICATION_NAME = "spring.application.name";
    /**
     * 默认应用名
     */
    public static final String DEFAULT_SPRING_APPLICATION_NAME = "application";
    /**
     * 端口
     */
    public static final String SERVER_PORT = "server_port";

    public static final String NAME = " :: Dynamic Thread Pool :: ";

    public static final String BANNER = "\n" +
            "|  __ \\                            (_) |__   __|   \n" +
            "| |  | |_   _ _ __   __ _ _ __ ___  _  ___| |_ __  \n" +
            "| |  | | | | | '_ \\ / _` | '_ ` _ \\| |/ __| | '_ \\ \n" +
            "| |__| | |_| | | | | (_| | | | | | | | (__| | |_) |\n" +
            "|_____/ \\__, |_| |_|\\__,_|_| |_| |_|_|\\___|_| .__/ \n" +
            "         __/ |                              | |    \n" +
            "        |___/                               |_|    ";
    public static final String FACTORY_NAME="dynamic-tp";


    public static final String DTP_NOTIFY="dtp-notify";

    public static final String DTP_MONITOR="dtp-monitor";
}
